Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding instascale e2e test #271

Merged

Conversation

Fiona-Waters
Copy link
Contributor

@Fiona-Waters Fiona-Waters commented Sep 4, 2023

Issue link

Closes project-codeflare/instascale#66

What changes have been made

An e2e test has been added to test the entire instascale flow on an OSD Cluster.

Verification steps

  • Provision an OSD cluster
  • Install the codeflare stack following the Quick Start and ensuring you follow the specific instructions here.
  • A NodeFeatureDiscovery CR and ClusterPolicy CR are required also. These can be added using the updated makefile - if installing using make all-in-one these should already be present. NFD and ClusterPolicy.
  • Using VS Code provide the cluster ID in a .vscode/settings.json file like this
{
   "go.testEnvVars": {
       "CLUSTERID": "261l6dk6frpvmt49csi90uhc6p7nrq7h",
   },
   "go.testFlags": ["-v", "-count=1"]
}
  • In your VS code terminal log in to your cluster.
  • Run or Debug the test.

Other Considerations

  • Testing on an OSD cluster the test fails as the current instascale functionality creates machine pools but then deletes the underlying machines, leaving behind the machine pools.
  • Testing on an OSD cluster on top of this PR the test passes as the updated instascale functionality creates and then deletes the machine pools. Image used: quay.io/rh_ee_fwaters/instascale-controller:test

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • Testing is not required for this change

@Fiona-Waters Fiona-Waters marked this pull request as ready for review September 26, 2023 08:52
@Fiona-Waters Fiona-Waters force-pushed the instascale-e2e-tests branch 2 times, most recently from 58dc44b to 544a0b5 Compare September 27, 2023 13:20
test/support/ocm.go Outdated Show resolved Hide resolved
test/support/support.go Show resolved Hide resolved
test/support/support.go Show resolved Hide resolved
test/support/codeflare.go Outdated Show resolved Hide resolved
@Fiona-Waters Fiona-Waters force-pushed the instascale-e2e-tests branch 2 times, most recently from 497a5cc to 6a65959 Compare October 5, 2023 12:45
test/support/codeflare.go Outdated Show resolved Hide resolved
test/support/codeflare.go Outdated Show resolved Hide resolved
@sutaakar
Copy link
Contributor

sutaakar commented Oct 6, 2023

@astefanutti @dimakis Can you please take a look?

Copy link
Contributor

@astefanutti astefanutti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very well done! Just left of couple of comments, otherwise looks very good!

test/support/codeflare.go Outdated Show resolved Hide resolved
Comment on lines 43 to 45
OsdClusterID = "CLUSTERID"
// Determine if test is being run on an OSD cluster, used for testing InstaScale.
IsOSD = "IS_OSD"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could it be assumed that it's an OSD cluster if an OSD cluster ID has been provided?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I think so, I have updated to reflect this.

test/support/codeflare.go Show resolved Hide resolved
test/support/config_map.go Outdated Show resolved Hide resolved
test/e2e/instascale_machinepool_test.go Outdated Show resolved Hide resolved
test/e2e/instascale_machinepool_test.go Outdated Show resolved Hide resolved
test/e2e/instascale_machinepool_test.go Outdated Show resolved Hide resolved
test/e2e/instascale_app_wrapper.go Outdated Show resolved Hide resolved
test/e2e/instascale_machinepool_test.go Outdated Show resolved Hide resolved
test/e2e/instascale_app_wrapper.go Show resolved Hide resolved
@Fiona-Waters
Copy link
Contributor Author

@astefanutti @dimakis Can you please take a look?

Thanks for the review @astefanutti ! I have pushed some changes if you could take another look when you have time please.

@Fiona-Waters Fiona-Waters force-pushed the instascale-e2e-tests branch 2 times, most recently from 0cf71d1 to 115ecd6 Compare October 6, 2023 14:42
@astefanutti
Copy link
Contributor

/lgtm

Great work!

@astefanutti
Copy link
Contributor

/approve

@openshift-ci
Copy link

openshift-ci bot commented Oct 6, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: astefanutti

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Oct 6, 2023
@openshift-ci openshift-ci bot merged commit 8c60290 into project-codeflare:main Oct 6, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create e2e tests for InstaScale
4 participants